#include <bits/stdc++.h>
using namespace std;

const int Mod=998244353;
const int N=205;

int n;

struct Matrix
{
	long long a[N][N];

	Matrix()
	{
		memset(a,0,sizeof(a));
	}

	Matrix operator*(const Matrix& oth) const
	{
		Matrix ans;
		for(int i=0;i<=n;i++)
			for(int k=0;k<=n;k++)
				if(a[i][k])
					for(int j=0;j<=n;j++)				
						(ans.a[i][j] += a[i][k]*oth.a[k][j]) %= Mod;
		return ans;
	}
}trans[25];

int main()
{
	freopen("drama.in","r",stdin);
	freopen("drama.out","w",stdout);
	int m;
	cin >> n >> m;
	for(int j=0;j<=n;j++)
		for(int k=1;k<=n;k++)
		{
			if(j==k)
				trans[0].a[j][j-1]++;
			else if(k<j)
				trans[0].a[j][j]++;
			else
				trans[0].a[j][k-1]++;
		}

	for(int i=1;i<=24;i++)
		trans[i]=trans[i-1]*trans[i-1];

	Matrix ans;
	ans.a[0][0]=1;
	for(int i=0;i<=24;i++)
		if((m>>i)&1)
			ans=ans*trans[i];
	printf("%lld\n",ans.a[0][0]);
	return 0;
}